# 导包
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
# 创建浏览器驱动
driver = webdriver.Chrome(executable_path='chromedriver.exe')
# 获取访问页面
driver.get("http://121.43.169.97:8848/pageA.html")
# 放大浏览器
driver.maximize_window()
time.sleep(1)
# 模拟用户操作
# 获取用户名：包含部分属性值
driver.find_element(By.XPATH, "//*[contains(@placeholder,'用户名')]").send_keys("admin")
time.sleep(3)
# 点击百度超链接：文本形式
driver.find_element(By.XPATH, "//*[text()='百度']").click()